home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 4
/
United Public Domain Gold 4.iso
/
fredfish
/
ff.0570.dms
/
ff.0570.adf
/
GadToolsBox
/
GadToolsBox.DOC
< prev
next >
Wrap
Text File
|
1991-11-21
|
46KB
|
909 lines
GadToolsBox v1.0 (The Sequel)
(c) Copyright 1991 Jaba Development
Written using DICE C v2.6 by
Jan van den Baard
User Manual
Disclaimer................ 1
Copyright/Distribution.... 2
Electronic Distribution... 3
Introduction.............. 4
Requirements.............. 5
Starting GadToolsBox...... 6
Making a Gadget........... 7
Program Menus............. 8
The Project Menu........ 8.1
The Gadgets Menu........ 8.2
The Window Menu......... 8.3
The Screen Menu......... 8.4
The Menus Menu.......... 8.5
Gadget Kind Requester..... 9
The CheckBox Gadget..... 9.1
The Integer Gadget...... 9.2
The ListView Gadget..... 9.3
The Mx Gadget........... 9.4
The Cycle Gadget........ 9.5
The Palette Gadget...... 9.6
The Scroller Gadget..... 9.7
The Slider Gadget....... 9.8
The String Gadget....... 9.9
Menu Requesters........... 10
The Menu Requester...... 10.1
The (Sub)Item Requester. 10.2
The Generated Source...... 11
Notes..................... 12
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 1) Disclaimer »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
The author cannot be held liable for the suitability or accuracy of this
manual and/or the program(s) it describes. Any damage directly or
indirectly caused by the use or misuse of this manual and/or the program
it describes is the sole responsibility of the user her/him self.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 2) Copyright/Distribution »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox, (c) Copyright 1991 Jaba Development. All rights reserved. This
Program is FREEWARE so no financial donations are required ( but welcome ).
This program may be freely distributed as long as all source code,
documentation and executable(s) remain unchanged and are included with the
distribution. Also no profit is to be made by selling this program. You
may not charge more than Fred Fish does for a single library disk. This
program may be distributed on disk magazines, cover disks etc. When you do
decide to distribute this program on a disk magazine or cover disk please
send me a copy of the distribution. When you use this program on a regular
base I would appreciate a postcard of your home town. If this program is
used to create a GadTools user interface for commercial or shareware
programs I would appreciate a little note about this in the program it's
documentation.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 3) Electronic Distribution »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
It is allowed for non-commercial BBSs to distribute an archive with only
the following files in it to save your users some money when they want to
download this program.
GadToolsBox - Main Program
GadToolsBox.info - Main Program icon.
GadToolsBox.DOC - Main Program Manual (This file)
nofrag.library - Shared library ( (c)1991 Jaba Development )
You may NOT upload this or any other form of this software on BBSs that
claim copyrights on the uploaded material!
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 4) Introduction »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox is a program that will save you a gigantic amount of time and
anguish in creating a GadTools user interface for your programs. This
program is a followup of my other source generator "PowerSource". It's
main purpose is to let you create your user interface without having to
type in the necessary code and structures yourself.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 5) Requirements »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox was programmed with DICE C v2.6 (Thanks Matt) on an Amiga 2500
Kickstart V37.175 Workbench V37.67 with 5 MB memory + ECS + A2630
accelerator card + 52 MB harddisk. It should however run happely on a 1 MB
machine without a harddisk and special chips. It MUST have Kickstart V37++
and Workbench V37++. You can try it on Kickstart V36 but I don't really
know if it will work properly. A C Compiler ( try registering DICE ) and
or an assembler with the 2.0 headers can also come in handy when you
try to compile/assemble the generated source.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 6) Starting GadToolsBox »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
You can start GadToolsBox from either the Shell or the Workbench. To start
GadToolsBox from the Shell you must type the following:
GadToolsBox [filename]
Where filename is an optional name of a previously created file which you
want to edit. To start GadToolsBox from the workbench you must either
double-click the program it's icon or one of the ".G" icons. When you have
started PowerSource without any arguments a window appears in the middle of
the screen. With this window we can select the Screen type on which we want
to edit the GadTools user interface. In this window you will see the
following gadgets:
Available modes » In this gadget you see a list of available display
modes. Just click on the desired display mode.
NOTE: The program currently only checks for the
availability of the LORES, HIRES and SUPER-
HIRES modes for both the PAL and NTSC
monitors.
Depth » This slider gadget lets you adjust the screen
depth. The screen depth determines the amount of
available colors.
Depth = 1, Colors = 2
Depth = 2, Colors = 4
Depth = 3, Colors = 8
Depth = 4, Colors = 16
Depth = 5, Colors = 32
OK » When this gadget is clicked the program will try
to open the desired screen and start the editing.
CANCEL » Clicking on this gadget will quit when you got in
this window upon program startup or cancel the
operation when you got in this window by selecting
"New" from the "Project" menu.
If everything went OK you now see the selected screen with a little window
on it.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 7) Making a Gadget »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
To make a gadget is quite simple. Move the mouse pointer to the place where
you want the top-left of the gadget to be. Now click the left mouse-button
once and move the mouse. You'll see a box which will size according to
your mouse moves. When the box is the size you want it click the left
mouse button again. Now a window pops up which allows you to edit the
gadget kind specifics ( refer to the "Gadget Kind Requester" for more info)
After you have edited the gadget specifics click on OK and the gadget is
on the window ready to be played around with.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 8) Program Menus »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox uses a set of menus to let you control the program. The
following describes each menu and it's items.
»»» 8.1) The Project Menu
About............. This opens a little window with some information about
the copyright, author and memory status. Just click on
the CONTINUE gadget to get rid of it.
New............... Reset's the program to the default deleting every change
made sofar. When there are changes made that are not
saved yet the program asks for confirmation.
Load.............. This opens the ASL FileRequester in which you can select
the file you want to load. The program can only load
binaries created by GadToolsBox. Any other kind of file
will simply be refused.
Save.............. This will save the GadTools interface to the file
specified in the ASL FileRequester. NOTE: The default
name is "unnamed.g"
Save As........... This opens the ASL FileRequester in which you can select
the path and file name under which the GadTools
interface is saved.
Generate Source...
C.............. This opens the ASL FileRequester in which you can select
the path and file name under which the generated C
source will be generated.
Assembler...... The same as C only the generated source will be in 68000
Assembler.
Preferences....... This opens the preferences window. In this window you
will see the following gadgets:
Static Data » When this is switched on the C
source will only contain static
data and routines.
RAW Asm source » When this is switched on the
Assembler source generated can be
assembled without the OS 2.0
headers.
Coordinates » If you want the mouse coordinates
to be displayed constantly you
should switch this gadget on.
Write Icon » When this is switched on every
binary written by GadToolsBox has
an icon to accompany it.
Count ID from » In this gadget you can enter the
ID number from which the program
starts to count the gadget ID's.
Project Prefix » In this gadget you can type a
prefix which is used by the source
generator. Refer to the "Generated
Source" chapter for more info.
Save » Opens the ASL FileRequester in
which you can select the path and
name under which the preferences
are saved.
Load » Opens the ASL FileRequester in
which you can select a GadToolsBox
preferences file to load.
Use » This tells GadToolsBox to use the
preferences you have set.
CANCEL » This cancels the operation.
Close Workbench... This will try to close the workbench screen so that you
can use the memory it took up. When this item reads Open
Workbench it will try to open the Workbench screen again
Quit.............. This will quit the program after asking for confirmation
»»» 8.2) The Gadgets Menu
In this menu some items will ask you to click a gadget to perform a certain
action. When you accidentally activated one of those items you can abort
the routine by pressing the ESC (Escape) key when the question "CLICK
GADGET.." pops up in the screen title bar.
Kind.............. This item has the program supported gadget kinds as
sub-items attached to it. Selecting any of these sub-
items will change the editing for that gadget kind.
All GadTools gadget kinds except for the NUMBER and TEXT
kinds are supported.
Move a gadget..... This asks you to click on the gadget you want to move.
When you click on a gadget a box is drawed around it.
Just move the box to where you want it and click on the
left mouse-button to confirm the place.
Size a gadget..... This asks you to click on the gadget that you want to
re-size. When you click on a gadget a box is drawed
around the gadget. Just move the mouse to adjust the
size of the box and click on the left mouse-button to
confirm the size. NOTE: The minimum possible size
depends on the gadget kind and the font size.
Copy a gadget..... This ask you to click on the gadget you want to copy.
Clicking on the gadget you want to copy will draw a box
around the gadget which you must drag to it's place.
Just click on the left mouse-button to confirm it's
place.
Delete a gadget... This asks you to click on the gadget you want to delete.
When you click on the gadget to delete it will be
removed and deallocated.
Edit a gadget..... This asks you to click on the gadget you want to edit.
Then the window for the specific kind of gadget will
open. Please refer to the "Gadget Kind Requester"
chapter for more information about these windows.
Join.............. This first asks you to click on a ListView gadget you
want to join. The the program asks you to click on the
string gadget you want to join with the ListView gadget.
The the routine joins the two gadgets together. This
joining means that the String gadget will be filled with
the entry name of a clicked entry in the ListView
gadget. NOTE: Due to a bug (or something) GadTools
requires the String Gadget to be of the same Width as
the ListView gadget. This is done automatically by the
program and it cannot be stopped. Also GadTools will
force the string gadget directly below the ListView
gadget. This also cannot be stopped.
Split............. This will ask you to click on a Joined gadget. Now you
can click either the joined ListView gadget or the
joined String Gadget and they will be split. NOTE: After
the Gadgets has been split the string Gadget returns to
the place where it has been originally drawn.
»»» 8.3) The Window Menu
Edit Flags........ This opens a requester in which all window flags are
listed using CheckBox gadgets. Just (de)select the flags
you want. Clicking on OK will set these flags and CANCEL
cancels the operation. NOTE: Only the SIZEGADGET,
DRAGBAR, DEPTHGADGET, CLOSEGADGET, SIZEBRIGHT and
SIZEBBOTTOM flags are (un)set on the edit window. The
rest of the flags will only turn up in the generated
source code.
Edit IDCMP........ This opens a requester in which all window IDCMP flags
are listed using CheckBox gadgets. Just (de)select the
flags you want. Clicking on OK will set these flags and
CANCEL cancels the operation. NOTE: The GadTools
specific IDCMP flags will always be set according to
the kind of gadgets on the window.
Edit Tags......... This will open a window in which some special window
tags can be edited. In the window you'll see the
following gadgets:
InnerWidth » When this gadget is selected the
generated source will use the
WA_InnerWidth Tag instead of the WA_Width
Tag. The value next to the gadget is the
current window InnerWidth.
InnerHeight » When this gadget is selected the
generated source will use the
WA_InnerHeight Tag instead of the
WA_Height Tag. The value next to the
gadget is the current window InnerHeight.
MouseQueue » When this gadget is selected the source
will contain the WA_MouseQueue tag. In
the string gadget next to this gadget you
can type the amount of MouseQueue's. NOTE
This value cannot be smaller than 1.
RptQueue » When this gadget is selected the source
will contain the WA_RptQueue tag. In the
string gadget next to this gadget you can
type the amount of RptQueue's. NOTE: This
value cannot be smaller than 1.
AutoAdjust » Selecting this will cause the generated
source to contain the WA_AutoAdjust tag.
Zoom » When this gadget is selected the WA_Zoom
is generated in the source code. In the
Left, Top, Width, Height gadgets you can
type the Window it's alternate positions.
WindowTitle » Type the Window title in here. If this
Gadget is empty the WA_Title tag will not
be generated.
ScreenTitle » Type the Screen title in here. If this
Gadget is empty the WA_ScreenTitle tag
will not be generated.
OK » This will set the desired changes and
resume to editing.
CANCEL » This will cancel the operation.
Add a text........ This will open the IntuiText editor window. In this
window you'll find the following gadgets:
Enter Text » In this gadget you must type the actual
text you want.
JAM1
JAM2
COMPLEMENT
INVERSVID » These four gadgets determine the drawmode
used to paint the text in the rastport.
FrontPen » With this palette gadget you can select
the FrontPen (text) color which is used
to draw the text.
BackPen » With this palette gadget you can select
the BackPen (background) color which is
used to draw the text.
OK » This gadget will close the window and let
you position the text in the edit window.
Clicking on the left mouse-button will
confirm the place.
CANCEL » This will cancel the operation.
Modify a text..... This will put up the text selection window if there was
more than one text added. In this text selection window
you'll see the following gadgets:
Available Texts » In this ListView gadget the texts
currently in memory are listed.
Clicking on the text will select it.
OK » This will select the text for the
operation that has to be done.
CANCEL » This will cancel the operation.
Now the IntuiText Editor opens with the selected text
already in it. Now you can edit the text the way you
want.
Delete a text..... This will put up the text selector again if more than
one text is added to the window. Just select the text
and it's gone. NOTE: When only one text is available the
text is deleted immediately.
Move a text....... The text selector pops up again if.... Now you can move
the text around in the edit window. Just click on the
left mouse-button to confirm it's new place.
»»» 8.4) The Screen Menu
Palette........... This will open the palette editor. In the palette editor
you'll see the following gadgets:
Red » With this slider gadget you can adjust the
Red intensity of the currently selected
color.
Green » With this slider gadget you can adjust the
Green intensity of the currently selected
color.
Blue » With this slider gadget you can adjust the
Blue intensity of the currently selected
color.
Colors » This gadget consists of 2, 4, 8, 16 or 32
colored gadgets and a color indicator left
of it. Just click on the color you want to
edit to switch to editing that color.
OK » This will close the Palette editor and set
the desired colors on the edit screen.
Reset » This will reset all colors to what they
where before the palette editor opened.
CANCEL » This will first reset all colors and then
exit the palette editor.
Get Font.......... This will open the ASL FontSelector for you to select a
new font. To select a font you must first click on the
desired font name and then enter or click on the desired
font height. Clicking on Ok will set the font on the
screen and clicking on Cancel will cancel the operation.
Set DriPens....... This will open the DriPen editor. DriPens are the pens
which the system uses to give that special new OS 2.0
look to the window and gadgets etc. The following
gadgets are in the DriPen editor:
Pens » This cycle gadget is used to select the
DriPen you want to edit. The following
DriPens are available:
DETAILPEN
This is the same as the standard
NewScreen detailpen.
BLOCKPEN
This is the same as the standard
NewScreen blockpen.
TEXTPEN
This is the pen used to draw the
gadget text and the Window title.
SHINEPEN
This is the pen used to draw the
"light-side" of the gadget and window
borders.
SHADOWPEN
This is the pen used to draw the
"dark-side" of the gadget and window
borders.
FILLPEN
This is the pen used to backfill the
gadget when it's clicked and the
window border when it's active.
FILLTEXTPEN
This is the pen used to draw the text
of a clicked gadget and the Window
title of an active window.
BACKGROUNDPEN
This pen is used to fill the
background of an unselected gadget.
HIGHLIGHTTEXTPEN
This pen is used to draw the text of a
gadget with the HighLight switch
turned on.
OK » Clicking on this gadget will set the
desired DriPens.
CANCEL » This will cancel the operation.
Edit Tags......... This will open the screen tags window. In this window
the following gadgets are located:
AutoScroll » With this gadget checked the generated
source will contain the SA_AutoScroll tag.
Type » This cycle gadget has the supported screen
types in it:
CUSTOMSCREEN
The generated source will contain the
screen tags and data. The window will
use this screen to open on.
WBENCHSCREEN
The generated source will not contain
the screen tags and data. The window
will use the Workbench screen to open
on.
CUSTOMSCREEN
The generated source will not contain
the screen tags and data. The window
will use the default public screen to
open on.
OK » This will set the desired tags.
CANCEL » This will cancel the operation.
»»» 8.5) The Menus Menu
Edit Menus........ This will open the Menu Editor window in which you can
edit a complete menu-strip. Refer to the "Menu
Requesters" chapter for more information.
Test Menus........ This will setup the menus, items and subitems to be
tested by you. When the message "TESTING MENUS! ESC TO
QUIT..." is printed in the screen title bar you can
browse through the menus like you normally do. You
should press the ESC (escape) key to resume to editing.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 9) Gadget Kind Requester »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox supports 10 gadget kinds which all have their own window in
which the gadget kind specifics can be edited. The following gadgets can be
found in all gadget kind requesters and are there for the same reason:
Text » In this gadget you can type the text which is displayed
with the gadget.
Label » In this gadget you can type the source code label which is
used to define some important values in the generated
source. Refer to the "Generated Source" chapter for more
information.
Underscore » When this gadget is selected the character in the
GadgetText preceeded by a '_' will be underlined which
specifies the keyboard shortcut.
Disabled » When this gadget is selected the gadget will be disabled.
The gadget will only be disabled in the generated source.
NOTE: Not all gadgets support this switch.
High Label » This tells that the GadgetText must be drawn in the
highlight text color. NOTE Not all gadgets support this
switch.
Text Place » This cycle gadget determines where that gadget text is
placed. The possibilities are IN, LEFT, RIGHT, ABOVE and
BELOW. NOTE: Only the Button gadget supports IN.
OK » This gadget will add the gadget with the selected
specifics to the edit window or set the desired changes.
CANCEL » This will cancel the operation.
Following is a description of the extra specifics of the different gadget
kinds supported by GadToolsBox.
»»» 9.1) The CheckBox Gadget
Checked » When this gadget is switched on it tells that the gadget is
checked by default.
»»» 9.2) The Integer Gadget
MaxChars » You must type the maximum possible digits plus one that may
be typed in the gadget. NOTE: This cannot be smaller than 2
Number » Type the default number in this gadget that the resulting
gadget has in it.
»»» 9.3) The ListView Gadget
Read Only » When this gadget is selected the ListView Gadget will be
read-only. NOTE: The ListView will only be read-only in the
generated source.
ShowSelected » When this gadget is selected the active (clicked) entry in
the listview gadget will be shown below the listview gadget
NOTE: This option is only available if the ListView isn't
ReadOnly.
Spacing » Type the extra number of pixels GadTools must insert
between the listview entries. NOTE: This value cannot be
smaller than 0.
Scr. Width » Type the width of the scroller gadget next to the ListView
gadget in here. NOTE: This value may not be smaller than 16
Labels » This is a ListView Gadget combined with a string gadget. In
the string gadget you can type the entries that the
listview must have. To edit an entry you must first click
on the entry in the listview and then edit the entry in the
string gadget. NOTE: The "!!ACTION GADGET!!" entry is
always in the list and cannot be removed or edited. This
entry is necessary to keep the ListView selectable in the
program. This entry will ofcourse not showup in the source
generated.
^ Remove ^ » This gadget enables you to remove entries from the list.
Just click on the entry in the ListView gadget and then on
this gadget and the entry is gone.
»»» 9.4) The Mx Gadget
Spacing » In this gadget you can type the spacing in pixels that
GadTools should insert between the items of the MX gadget.
Labels » This is a ListView Gadget combined with a string gadget. In
the string gadget you can type the entries that the
mx must have. To edit an entry you must first click
on the entry in the listview and then edit the entry in the
string gadget. NOTE: You must enter atleast two entries
for the MX gadget.
^ Remove ^ » This gadget enables you to remove entries from the list.
Just click on the entry in the ListView gadget and then on
this gadget and the entry is gone.
»»» 9.5) The Cycle Gadget
Labels » This is a ListView Gadget combined with a string gadget. In
the string gadget you can type the entries that the
cycle must have. To edit an entry you must first click
on the entry in the listview and then edit the entry in the
string gadget. NOTE: You must enter atleast two entries
for the Cycle gadget.
^ Remove ^ » This gadget enables you to remove entries from the list.
Just click on the entry in the ListView gadget and then on
this gadget and the entry is gone.
»»» 9.6) The Palette Gadget
Width » In this gadget you can type the width of the color
indicator if you want one on the left of the gadget. NOTE:
any value smaller than 9 will indicate that you do not want
a color indicator.
Height » In this gadget you can type the height of the color
indicator if you want one above the gadget. NOTE: any value
smaller than 9 will indicate that you do not want a color
indicator.
»»» 9.7) The Scroller Gadget
Immediate » When this gadget is selected you will hear any
IDCMP_GADGETDOWN message through the window IDCMP port that
this gadget generates.
RelVerify » When this gadget is selected you will hear any
IDCMP_GADGETUP message through the window IDCMP port that
this gadget generates.
Horizontal
Vertical » With this gadget you can determine whether this gadget can
be moved horizontally or vertically.
Top » In this gadget you can type the top of the area the
scroller is used for.
Total » In this gadget you can type the total of the area the
scroller is used for.
Visible » In this gadget you can type the visible part of the area
this scroller is used for.
Arrows » In this gadget you can type the size in pixels of an arrow.
NOTE: Specifying a value smaller than 8 says you don't
want arrows.
»»» 9.8) The Slider Gadget
Immediate » When this gadget is selected you will hear any
IDCMP_GADGETDOWN message through the window IDCMP port that
this gadget generates.
RelVerify » When this gadget is selected you will hear any
IDCMP_GADGETUP message through the window IDCMP port that
this gadget generates.
Horizontal
Vertical » With this gadget you can determine whether this gadget can
be moved horizontally or vertically.
Min » In this gadget you can type the minimum value of the slider.
Max » In this gadget you can type the maximum value of the slider.
Level » In this gadget you can type the initial level the slider
must have.
Level Size » In this gadget you can type the maximum amount of
characters that may be used to print the slider level.
Format » A formatting string ala RawDoFmt() which specifies the way
the slider level should be printed. NOTE: When this is
omitted the slider level won't be printed.
Lev. Place » With this gadget you can specify where GadTools is to print
the slider level. The possibilities are LEFT, RIGHT, ABOVE
and below.
»»» 9.9) The String Gadget
MaxChars » You must type the maximum possible characters plus one that
may be typed in the gadget. NOTE: This cannot be smaller
than 2.
String » Type the default string in this gadget that the resulting
gadget has in it.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 10) Menu Requesters »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
GadToolsBox uses three (actually two) windows to let the user edit complete
menu-strips. Following is a description of those windows.
»»» 10.1) The Menu Requester
This requester is used to edit the menus. In the window you'll see the
following gadgets:
Menus » This listview gadget contains the names of the menus
currently in memory. Below this ListView gadget a string
gadget is located which is used to enter/edit the menu
names. To add a new menu to the list you must enter it's
name in this string gadget and press return. To edit a menu
name you must first click on the name in the listview
gadget and then edit the name in the string gadget.
Disabled » This CheckBox gadget tells GadToolsBox whether you want the
menu to be disabled or not.
ItemEd » This gadget must be clicked when you want to add some items
to a menu. To do this you must first click on the menu name
in the listview gadget which you want to edit items for and
then click on this gadget. If all goes well you will be
presented with the "(Sub)Item Requester" (see below).
Delete » When you want to delete a menu you must click on it's name
in the listview gadget and then click on this gadget. Then
a requester pops up asking for confirmation. NOTE: Deleting
a menu with items attached to it will also delete those
items.
DONE » Clicking on this gadget will close the requester and resume
to gadget editing.
»»» 10.1) The (Sub)Item Requester
This requester is used to edit (sub)items for a specific menu. This
requester is the same for editing items and subitems. The following gadgets
are in the window:
(Sub)Items » This listview gadget contains the names of the (sub)
items currently attached to the menu. Below this ListView
gadget a string gadget is located which is used to enter
/edit the (sub)item names. To add a new (sub)item to the
list you must enter it's name in this string gadget and
press return. To edit a menu name you must first click on
the name in the listview gadget and then edit the name
in the string gadget.
Checkit » This will turn the intuition CHECKIT flag on/off for the
(sub)item.
Disabled » This CheckBox gadget tells GadToolsBox whether you want the
(sub)item to be disabled or not.
Checked » This will turn the intuition CHECKED flag on/off for the
(sub)item.
MenuToggle » This will turn the intuition MENUTOGGLE flag on/off for the
(sub)item.
ShortCut » You can add a keyboard shortcut for the (sub)item by
entering the shortcut key in this gadget.
BarLab » When you click on this gadget a separator bar (NM_BARLABEL)
is inserted in the list automatically.
SubEd » This gadget must be clicked when you want to add some
subitems to a item. To do this you must first click on the
item name in the listview g adget which you want to edit
subitems for and then click on this gadget. If all goes
well the requester will switch to subitems editing. NOTE:
This gadget is disabled when the requester already is in
the subitem mode.
Delete » When you want to delete a (sub)item you must click on it's
name in the listview gadget and then click on this gadget.
Then a requester pops up asking for confirmation. NOTE:
Deleting a item with subitems attached to it will also
delete those subitems.
DONE » Clicking on this gadget will close the requester and put
you back in the menu requester.
NOTE: There is a possibility to set the MutualExclude of an item but this
has a bug in it which I can't find. When you click on the (sub)item which
must do the excluding and you press the 'x' key you will see the message
"DRAG-SELECT ITEMS TO EXCLUDE" in the title bar of the item ed window. Now
you must click the menu-button of the mouse and go to the menu. Here's the
bug..... YOU MUST KEEP THE MOUSE WITH THE RIGHT-BUTTON PRESSED ON THE MENU
FOR ABOUT 10-15 SECONDS BEFORE INTUITION DESIDES TO DROP THE MENU ??????
When the menu is down you must check the items that are to be excluded and
the mutual-exclude value will be set. To check several items you must click
the left-mouse-button on each item whilst holding down the right mouse-
button. If you know what the bug is please tell me about it so that I can
fix it.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 11) The Generated Source »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
The source GadToolsBox generates contains complete routines that
opens/locks the screen and allocates/initializes the gadgets and menus and
opens the window and prints the text's. Therefore there are two routines
created. The following globals are exported when necessary and when the
generated source isn't static:
xxxWnd » A pointer to the window
xxxScr » A pointer to the screen
xxxVisualInfo » A pointer to the screen it's visualinfo
xxxGList » A pointer to the created gadgets
xxxGadgets[..] » An array of pointers to the created gadgets
xxxMenus » A pointer to the created menus
xxxZoom[4] » An array of words with the window alternate positions
xxxInitStuf() » The routine which sets up the stuff
xxxCleanStuff() » Cleans up all resources used
NOTE: The 'xxx' stands for the Project Prefix which you can enter using the
preferences requester.
The GadgetID are defined as 'GD_SourceLabel'. Some of the above declared
data is not always there. For instance when you havent edited any menus
the 'xxxMenus' wont be generated. The 'xxxInitStuff()' can return the
following return codes:
0 » Everything is OK
1 » The screen could not be opened/locked
2 » GetVisualInfo failed
3 » A GadgetContext could not be created
4 » An error occured with the gadget creation
5 » The window could not be opened
6 » The menus could not be created
NOTE: When the 'xxxInitStuff()' routine returns an error you must still
call 'xxxCleanStuff()' to deallocate/close the resources that did not
fail to open!
To get a better impression of the generated source you should load/create a
sample file and generate the source for it. Then you can take a look to
what was generated.
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
» 12) Notes »
»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»
At this time there really isn't much to say about the program. It is a tool
that will ( or atleast should ) save you a lot of time in creating a
GadTools user interface for your programs. I really don't know how the
program reacts under low memory conditions because no testing has been done
under these conditions ( what can I say.... I'm lazy... ).
Bug reports, suggestions, postcards, flames, criticism, contributions,
ideas, gifts, etc., etc., etc........... to:
Jan van den Baard Fido: 2:500/29 (Jan van.den.Baard)
Bakkerstraat 176
3082 HE, Rotterdam
Holland